Towards a Logical Semantics for Referential Actions in SQL
نویسندگان
چکیده
We investigate a logical semantics which unambiguously speciies the meaning of SQL-like referential actions of the form ON DELETE CASCADE and ON DELETE RESTRICT. The semantics is given by a translation of referential actions into logical rules. The proposed semantics is less restrictive than the standard SQL semantics, yet preserves all referential integrity constraints. First, a preliminary set of rules is introduced which rejects a set of user requests if a single request is rejected. Subsequently, a reened translation is presented using Statelog LHL95], a state-oriented Datalog extension which allows to deene active and de-ductive rules within a uniied framework. We show that our semantics yields the maximal admissible subset of a given set of user requests. Apart from the Statelog formalization, a three-valued formalization based on the well-founded semantics and an equivalent game-theoretic speciication are presented, which give further insight into the problem of ambiguity of triggers.
منابع مشابه
Referential Actions as Logical Rules
Referential actions are specialized triggers used to automatically maintain referential integrity. While their local behavior can be grasped easily, it is far from clear what the combined eeect of a set of referential actions, i.e., their global semantics should be. For example, diierent execution orders may lead to ambiguities in determining the nal set of updates to be applied. To resolve the...
متن کاملThe semantics of an extended referential integrity for a multilevel secure relational data model
To prevent information leakage in multilevel secure data models, the concept of polyinstantiation was inevitably introduced. Unfortunately, when it comes to references through foreign key in multilevel relational data models, the polyinstantiation causes referential ambiguities. To resolve this problem, this paper proposes an extended referential integrity semantics for a multilevel relational ...
متن کاملConsistent Aggregations in Databases with Referential Integrity Errors
A data warehouse integrates tables coming from multiple source databases, where each database has different tables, columns with similar content across databases and different referential integrity constraints, enforced to different compliance levels. Some source databases may have more reliable data than others, if referential integrity is more strictly enforced or their respective logical dat...
متن کاملStatic Analysis of Partial Referential Integrity for Better Quality SQL Data
Referential integrity ensures the consistency of data between database relations. The SQL standard proposes different semantics to deal with partial information under referential integrity. Simple semantics neglects tuples with nulls, and enjoys built-in support by commercial database systems. Partial semantics does check tuples with nulls, but does not enjoy built-in support. We investigate th...
متن کاملReferential Actions: From Logical Semantics to Implementation
Referential actions rac s are specialized triggers used to au tomatically maintain referential integrity While their local e ects can be grasped easily it is far from obvious what the global semantics of a set RA of interacting rac s should be To capture the intended meaning of RA we rst present an abstract non constructive semantics By formal izing RA as a logic program PRA a constructive sema...
متن کامل